// //获取应用实例
var app = getApp()
var uid = 0;
//logs.js
var util = require('../../utils/util.js')
Page({
  data: {
    toView: 'hash1',
    data:{},
    hasData:false,
    mTop:0,
    footer_curr:[
      "curr",''
    ],
    businessCardWidth:"300px",
    imgDomain: app.globalData.imgDomain,
    followmeList:false,
    categoryData:false,
    recommendData:false,
    uid:0
  },
  goAtherPage: function(e){
      var url = e.currentTarget.dataset.link;
      wx.navigateTo({url: url})
  },
  goAtherPageRedirect: function(e){
      var url = e.currentTarget.dataset.link;
      wx.redirectTo({url: url})
  },
  onLoad: function(options){    
    var that = this;
    var inviteuid = options.inviteuid;
    //调用应用实例的方法获取全局数据
    app.LoginUserInfo(function(res){
      //更新数据      
      if (res && res != -1) {
      uid = res.uid;
      that.setData({
        uid:uid
      });
      util.api({
        data: {
          "uid": uid,
          "publickey": util.publiccode,
          "ac": "followmelist"
        },
        success: function(responseData){
          if(!responseData.data.msg){
            that.setData({
              followmeList:responseData.data
            });
          }
        }
      });
      }
    }, inviteuid);
  },
  onReady: function(){
   
  },
  //下拉刷新
  onPullDownRefresh: function(){
    console.log('refresh...');
    wx.stopPullDownRefresh()
  },
  //页面分享
  onShareAppMessage: function () {
    return app.sharePage('', uid);
  },
})